//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package test.test.jkd7_jdk8判断闰年;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Calendar;

public class demo {
    public demo() {
    }

    public static void main(String[] args) {
        System.out.println(Jdk7If(2008));
        System.out.println(Jdk8If(2008));
    }

    public static boolean Jdk7If(Integer year) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(year, 2, 1);
        calendar.add(5, -1);
        return calendar.get(5) == 29;
    }

    public static boolean Jdk8If(Integer year) {
        LocalDateTime ldt1 = LocalDateTime.of(year, 3, 1, 0, 0).minusDays(1L);
        return LocalDate.of(year, 1, 1).isLeapYear();
    }
}
